package com.hktf.uilib.widget;

import android.annotation.SuppressLint;
import android.content.Context;
import android.text.InputFilter;
import android.util.AttributeSet;
import android.widget.EditText;

import com.hktf.corelib.utils.NoEnterInputFilter;

@SuppressLint("AppCompatCustomView")
public class NoEnterEditText extends EditText {
    public NoEnterEditText(Context context) {
        super(context);
        init();
    }

    public NoEnterEditText(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public NoEnterEditText(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    public NoEnterEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        init();
    }
    private void init(){
        setFilters(new InputFilter[]{new NoEnterInputFilter()});
    }
}
